<div class="container-fluid form-horizontal">
	<div class="col-xs-12 col-md-12 mt10">
		<div class="form-group">
			<label class="col-sm-2 col-xs-12 control-label">支付类型</label>
			<div class="col-sm-4 col-xs-12">
				<label class="radio-inline">
				  <input type="radio" name="pay_type" value="0"
				  ng-model="saleobj.pay_type" ng-disabled="util.what == 'info'" 
				  > 其他方式支付
				</label>
				<label class="radio-inline">
				  <input type="radio" name="pay_type" value="1"
				  ng-model="saleobj.pay_type" ng-disabled="util.what == 'info'"
				  > 预存支付
				</label>
			</div>
			<div class="col-sm-6 col-xs-12">
				<p class="form-control-static text-danger">
					预存支付：平台预存支付；其他方式支付：微信、支付宝支付
				</p>
			</div>
		</div>

		<div class="form-group">
			<label class="col-sm-2 col-xs-12 control-label">库存类型</label>
			<div class="col-sm-4 col-xs-12">
				<label class="radio-inline">
				  <input type="radio" name="stock_type" value="0"
				  ng-model="saleobj.stock_type" ng-disabled="util.what == 'info'" 
				  > 不启用
				</label>
				<label class="radio-inline">
				  <input type="radio" name="stock_type" value="1"
				  ng-model="saleobj.stock_type" ng-disabled="util.what == 'info'"
				  > 启用
				</label>
				<label class="radio-inline">
				  <input type="radio" name="stock_type" value="2"
				  ng-model="saleobj.stock_type" ng-disabled="util.what == 'info'"
				  > 每日库存
				</label>
				<!-- <div class="col-sm-6 col-xs-12 pull-right" ng-show="saleobj.stock_type == 1">
					<input type="number" class="form-control" placeholder="预存数量" ng-disabled="util.what == 'info'" min='0' ng-model="saleobj.current_stock_num">
				</div> -->
			</div>
			<div class="col-sm-6 col-xs-12">
				<p class="form-control-static text-danger">
					是否启用库存
				</p>
			</div>
		</div>

		<div class="form-group" ng-show="saleobj.stock_type == 1">
			<label class="col-sm-2 col-xs-12 control-label">预存数量</label>
			<div class="col-sm-4 col-xs-12">
				<input type="number" class="form-control" placeholder="预存数量" min='0' ng-model="saleobj.current_stock_num">
			</div>
			<div class="col-sm-6 col-xs-12">
				<p class="form-control-static text-danger">
					启用库存后填写此项, 用于设置库存
				</p>
			</div>
		</div>

		<div class="form-group">
			<label class="col-sm-2 col-xs-12 control-label">销售目标</label>
			<div class="col-sm-4 col-xs-12">
				<label class="radio-inline">
				  <input type="radio" name="sale_target_type" value="0"
				  ng-model="saleobj.sale_target_type" ng-disabled="util.what == 'info'"
				  > 公开销售
				</label>
				<label class="radio-inline">
				  <input type="radio" name="sale_target_type" value="1"
				  ng-model="saleobj.sale_target_type" ng-disabled="util.what == 'info'"
				  > 独立授权销售
				</label>
			</div>
			<div class="col-sm-6 col-xs-12">
				<p class="form-control-static text-danger">
					公开销售：默认所有分销商可见，可设置分销商不可见<br/> 授权销售：默认所有分销商不可见，可设置分销商可见
				</p>
			</div>
		</div>

		<div class="form-group">
			<label class="col-sm-2 col-xs-12 control-label">生效时间</label>
			<div class="col-sm-4 col-xs-12">
				<select class="form-control" ng-model="saleobj.take_effect_type" ng-disabled="util.what == 'info'" ng-options="take_effect_type.value as take_effect_type.name for take_effect_type in page.take_effect_typearr">
	            </select>
			</div>
			<div class="col-sm-6 col-xs-12">
				<p class="form-control-static text-danger">
					支付成功后何时可以使用
				</p>
			</div>
		</div>

		<div class="form-group quarestrict">
			<label class="col-sm-2 col-xs-12 control-label">数量限制</label>
			<div class="col-sm-4 col-xs-12">
			</div>
			<div class="col-sm-6 mt10">
			</div>
		</div>

		<div class="panel panel-default quarestrict">
			<br/>
			<div class="form-group" style="margin-bottom: 0px;">
				<label class="col-sm-2 col-xs-12 control-label">产品最大限制</label>
				<div class="col-sm-4 col-xs-12">
					<input type="number" class="form-control" ng-model="saleobj.max_limit" ng-disabled="util.what == 'info'">
				</div>
				<div class="col-sm-6 col-xs-12">
					<p class="form-control-static text-danger">
						用户累积购买数量限制，0:不限，其他数字:限制购买数量<br/> 产品分类为团产品时，此处填写预定最多预定人数限制，0：不限制
					</p>
				</div>
			</div>
			<div class="form-group" ng-show="saleobj.max_limit > 0">
				<label class="col-sm-2 col-xs-12 control-label">限制方式</label>
				<div class="col-sm-4 col-xs-12">
					<label class="radio-inline">
						<input type="radio" name="limit_type" value="0" ng-model="saleobj.limit_type" 
						ng-disabled="util.what == 'info'" ng-click="limitType('0')"> 会员
					</label>
					<label class="radio-inline">
						<input type="radio" name="limit_type" value="1" ng-model="saleobj.limit_type" 
						ng-disabled="util.what == 'info'" ng-click="limitType('1')"> 身份证号
					</label>
				</div>
				<div class="col-sm-6 col-xs-12">
					<p class="form-control-static text-danger">
						用户累积购买数量限制方式，身份证号限制方式默认购买时必填身份证号
					</p>
				</div>
			</div>
			<div class="form-group" style="margin-bottom: 0px;">
				<label class="col-sm-2 col-xs-12 control-label">产品每单上限</label>
				<div class="col-sm-4 col-xs-12">
					<input type="number" class="form-control" ng-model="saleobj.order_num_limit" ng-disabled="util.what == 'info'">
				</div>
				<div class="col-sm-6 col-xs-12">
					<p class="form-control-static text-danger">
						用户每次下单购买最大数量限制，0:不限，其他数字:限制购买数量<br/> 产品分类为团产品时，此处填写预定最多预定人数限制，0：不限制
					</p>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 col-xs-12 control-label">产品每单下限</label>
				<div class="col-sm-4 col-xs-12">
					<input type="number" class="form-control" ng-model="saleobj.order_num_limit_down" ng-disabled="util.what == 'info'">
				</div>
				<div class="col-sm-6 col-xs-12">
					<p class="form-control-static text-danger">
						用户每次下单购买最小数量限制，0:不限，其他数字:限制购买数量<br/> 产品分类为团产品时，此处填写预定最少预定人数限制，0：不限制
					</p>
				</div>
			</div>
		</div>

		<div class="form-group">
			<label class="col-sm-2 col-xs-12 control-label">出游时间</label>
			<div class="col-sm-4 col-xs-12">
				<label class="radio-inline">
				  <input type="radio" name="tour_date_type" value="0"
				  ng-model="saleobj.tour_date_type"  ng-disabled="util.what == 'info'"
				  > 不启用
				</label>
				<label class="radio-inline">
				  <input type="radio" name="tour_date_type" value="1"
				  ng-model="saleobj.tour_date_type" ng-disabled="util.what == 'info'"
				  > 启用
				</label>
			</div>
			<div class="col-sm-6 col-xs-12">
				<p class="form-control-static text-danger">
					启用出游时间后，该销售品只能在出游日期当天使用，否则有效期内均可使用
				</p>
			</div>
		</div>

		<div class="form-group">
			<label class="col-sm-2 col-xs-12 control-label">允许退票</label>
			<div class="col-sm-4 col-xs-12">
				<label class="radio-inline">
				  <input type="radio" name="back_type" value="0" ng-model="saleobj.back_type" 
					ng-disabled="util.what == 'info'"> 允许
				</label><br/>
				<label class="radio-inline">
				  <input type="radio" name="back_type" value="1" ng-model="saleobj.back_type" 
					ng-disabled="util.what == 'info'"> 不允许
				</label><br/>
				<label class="radio-inline">
				  <input type="radio" name="back_type" value="2" ng-model="saleobj.back_type" 
					ng-disabled="util.what == 'info'"> 只能整单退，不可部分退票
				</label><br/>
				<label class="radio-inline">
				  <input type="radio" name="back_type" value="4" ng-model="saleobj.back_type" 
					ng-disabled="util.what == 'info'"> 只能退最大可退数量
				</label>
			</div>
			<div class="col-sm-6 col-xs-12">
				<p class="form-control-static text-danger">此产品的是否可退票和退票方式</p>
			</div>
		</div>

		<div class="form-group">
			<label class="col-sm-2 col-xs-12 control-label">退票审核</label>
			<div class="col-sm-4 col-xs-12">
				<label class="radio-inline">
				  <input type="radio" name="apply_state" value="0"
				  ng-model="saleobj.apply_state" ng-disabled="util.what == 'info'"
				  > 不需要
				</label>
				<label class="radio-inline">
				  <input type="radio" name="apply_state" value="1"
				  ng-model="saleobj.apply_state" ng-disabled="util.what == 'info'"
				  > 需要
				</label>
			</div>
			<div class="col-sm-6 col-xs-12">
				<p class="form-control-static text-danger">
					退票是否需要运营商审核
				</p>
			</div>
		</div>

		<div class="form-group">
			<label class="col-sm-2 col-xs-12 control-label">是否出票</label>
			<div class="col-sm-4 col-xs-12">
				<label class="radio-inline">
				  <input type="radio" name="ticket_type" value="0"
				  ng-model="saleobj.ticket_type" ng-disabled="util.what == 'info'"
				  > 出票
				</label>
				<label class="radio-inline">
				  <input type="radio" name="ticket_type" value="8"
				  ng-model="saleobj.ticket_type" ng-disabled="util.what == 'info'"
				  > 不出票
				</label>
			</div>
			<div class="col-sm-6 col-xs-12">
				<p class="form-control-static text-danger">

				</p>
			</div>
		</div>

		<div class="form-group">
			<label class="col-sm-2 col-xs-12 control-label">实名限制</label>
			<div class="col-sm-4 col-xs-12">
				<label class="radio-inline">
				  <input type="radio" name="user_status" value="0"
				  ng-model="saleobj.user_status" ng-disabled="util.what == 'info'"
				  > 不实名制
				</label>
				<label class="radio-inline">
				  <input type="radio" name="user_status" value="1"
				  ng-model="saleobj.user_status" ng-disabled="util.what == 'info'"
				  > 实名制
				</label>
			</div>
			<div class="col-sm-6 col-xs-12">
				<p class="form-control-static text-danger">
					购买时是否要求为实名制会员
				</p>
			</div>
		</div>

		<div class="form-group">
			<label class="col-sm-2 col-xs-12 control-label" style="margin-top:20px">身份证号</label>
			<div class="col-sm-4 col-xs-12" style="margin-top:20px">
				<label class="radio-inline">
					<input type="radio" name="cardno_state" value="0"
					ng-model="saleobj.cardno_state" ng-disabled="saleobj.limit_type==1"
					> 不必填
				</label>
				<label class="radio-inline">
					<input type="radio" name="cardno_state" value="1"
					ng-model="saleobj.cardno_state" ng-disabled="saleobj.limit_type==1"
					> 必填
				</label>
				<div class="col-sm-7 col-xs-12 pull-right" ng-show="saleobj.cardno_state == 1">
					<input type="text" class="form-control" placeholder="请输入身份证号首" ng-model="saleobj.cardno_limit">
				</div>
			</div>
			<div class="col-sm-6 col-xs-12">
				<p class="form-control-static text-danger">
					下单时是否必填身份证号码。配置必填时，可以同时配置身份证号首，如：配置210106，只有210106开头的身份证号可以下单，如果不配置身份证号首，下单时则不对身份证号首进行校验
				</p>
			</div>
		</div>

		<div class="form-group">
			<label class="col-sm-2 col-xs-12 control-label">票码类型</label>
			<div class="col-sm-4 col-xs-12">
				<label class="radio-inline">
				  <input type="radio" name="sms_ticketcode_type" value="0"
				  ng-model="saleobj.sms_ticketcode_type" ng-disabled="util.what == 'info'"
				  > 票码
				</label>
				<label class="radio-inline">
				  <input type="radio" name="sms_ticketcode_type" value="1"
				  ng-model="saleobj.sms_ticketcode_type" ng-disabled="util.what == 'info'"
				  > 订单唯一码
				</label>
			</div>
			<div class="col-sm-6 col-xs-12">
				<p class="form-control-static text-danger">
					票码：每码只能核销一次，订单唯一码：一单一码，可核销多次
				</p>
			</div>
		</div>

		<div class="form-group">
			<label class="col-sm-2 col-xs-12 control-label">自动下架</label>
			<div class="col-sm-4 col-xs-12">
				<label class="radio-inline">
				  <input type="radio" name="over_period_off" value="1"
				  ng-model="saleobj.over_period_off" ng-disabled="util.what == 'info'"
				  > 全部票种到期自动下架
				</label>
				<label class="radio-inline">
				  <input type="radio" name="over_period_off" value="0"
				  ng-model="saleobj.over_period_off" ng-disabled="util.what == 'info'"
				  > 不启用自动下架
				</label>
			</div>
			<div class="col-sm-6 col-xs-12">
				<p class="form-control-static text-danger">
					是否过期自动下架
				</p>
			</div>
		</div>

		<div class="form-group">
			<label class="col-sm-2 col-xs-12 control-label">验证方式</label>
			<div class="col-sm-4">
				<!-- 用于隐藏选项 -->
				<img type="text" ng-model="saleobj.verification_modes" style="width:0px;height:0px;">
				<label class="radio-inline" style="padding-left:0px;">
				  <input type="checkbox" name="verification_modes_ID" 
				  ng-model="saleobj.verification_modes_ID" 
				  > 身份证
				</label>
				<label class="radio-inline">
				  <input type="checkbox" name="verification_modes_card"
				  ng-model="saleobj.verification_modes_card" 
				  > 卡号
				</label>
				<label class="radio-inline">
				  <input type="checkbox" name="verification_modes_qr_code"
				  ng-model="saleobj.verification_modes_qr_code" 
				  > 二维码
				</label>
				<label class="radio-inline">
				  <input type="checkbox" name="verification_modes_ticket_code" 
				  ng-model="saleobj.verification_modes_ticket_code" 
				  > 票码
				</label>
				<!-- <label class="radio-inline">
				  <input type="checkbox" name="over_period_off"
				  ng-model="saleobj.verification_modes_order_code" 
				  > order_code
				</label> -->
			</div>
			<div class="col-sm-6 col-xs-12">
				<p class="form-control-static text-danger">
					此产品可以验证的方式
				</p>
			</div>
		</div>

		<div class="form-group" ng-if="util.what == 'edit'">
			<label class="col-sm-2 col-xs-12 control-label"></label>
			<div class="col-sm-4 col-xs-12">
				<button type="button" class="btn btn-primary btn-lg" ng-click="save()">保存</button>
				<button type="button" class="btn btn-primary btn-lg" ng-click="saveAndBack()" ng-if="(saleobj.id != '') && (util.$modalInstance != undefined)">保存并返回</button>
			</div>
			<div class="col-sm-6 col-xs-12">
				<p class="form-control-static text-danger">

				</p>
			</div>
		</div>
	</div>
</div>